import { PlayerShip } from "./ship"

export interface ICommodity{
    name: string
    price: number
    priceRandom: number
    origin: string //产地
    probability: number //产出概率 1 - 100
    info: string
    weight: number
}

export class Commodity implements ICommodity{
    name: string
    price: number
    priceRandom: number
    origin: string
    probability: number
    info: string
    weight: number
    constructor(data: ICommodity){
        this.name = data.name
        this.price = data.price
        this.priceRandom = data.priceRandom
        this.origin = data.origin
        this.probability = data.probability
        this.info = data.info
        this.weight = data.weight
    }

    
    buy(ship: PlayerShip){

    }

    sell(ship: PlayerShip){

    }
}